<?php $this->load->view('layout/header'); ?>
<div>
</div>
    <div id="container">
        <!--查询表单开始-->
        <div id="DivQuery">
            <div id="floatBoxBg" style="filter: alpha(opacity=0); opacity: 0;">
            </div>
            <div id="floatBox" class="floatBox">
                <div id="drag" class="title" onmousedown="DragDialog()">
                    <h4>
                        查询</h4>
                    <span>关闭</span></div>
                <div class="content">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_query">
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                帐号：
                            </td>
                            <td>
                                <input name="txtAdminName" type="text" id="txtAdminName" />
                            </td>
                            <td style="width: 15%" align="right">
                                管理组：
                            </td>
                            <td>
                                <select name="drpAdminGroupID" id="drpAdminGroupID">
                                	<option value="-1">不限</option>
                                	<option value="1">系统管理组</option>
                                	<option value="4">基础管理员</option>
                                </select>
                            </td>
                        </tr>
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                姓名：
                            </td>
                            <td>
                                <input name="txtRealName" type="text" id="txtRealName" />
                            </td>
                            <td style="width: 15%" align="right">
                                E-mail：
                            </td>
                            <td>
                                <input name="txtEmail" type="text" id="txtEmail" />
                            </td>
                        </tr>
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                部门：
                            </td>
                            <td>
                                <input name="txtDepartment" type="text" id="txtDepartment" />
                            </td>
                            <td style="width: 15%" align="right">
                                状态：
                            </td>
                            <td>
                                <span id="radIsClose"><input id="radIsClose_0" type="radio" name="radIsClose" value="-1" checked="checked" /><label for="radIsClose_0">不限</label><input id="radIsClose_1" type="radio" name="radIsClose" value="0" /><label for="radIsClose_1">开放</label><input id="radIsClose_2" type="radio" name="radIsClose" value="1" /><label for="radIsClose_2">关闭</label></span>
                            </td>
                        </tr>
                        <tr class="table_query_btn">
                            <td align="right" style="width: 15%">
                            </td>
                            <td>
                                <input type="submit" name="btnQuery" value="查询" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnQuery&quot;, &quot;&quot;, false, &quot;&quot;, &quot;Admin.aspx&quot;, false, false))" id="btnQuery" />
                                <input type="button" value="返回" onclick="javascript:HiddenSearchDialog();" />
                            </td>
                            <td align="right" style="width: 15%">
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <!--查询表单结束-->
        <!--导航开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_nav">
            <tr>
                <td>
                    管理员管理&gt;管理列表
                </td>
            </tr>
        </table>
        <!--导航结束-->
        <!--操作选项开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_op">
            <tr>
                <td>
                    操作选项：
                    <a href="<?php echo b_url('config/admin_add')?>">添加管理员</a>
                    <a onclick="javascript:return checkEdit(this);" name="AdminID" id="lbtnEdit" src="<?php echo site_url('config/admin_add').'/'?>" href="javascript:;" >修改管理员</a>
                    <a onclick="javascript:return checkDel(this);" name="AdminID" src="<?php echo site_url('config/delete_info/admin/adminid/admin').'/'?>" id="lbtnDel" href="javascript:;">删除管理员</a>
                    <a onclick="javascript:return checkOperate(this);" name="AdminID" src="<?php echo site_url('config/edit_close/admin/adminid/admin/0/').'/'?>" id="lbtnOpen" href="javascript:;)">批量开放</a>
                    <a onclick="javascript:return checkOperate(this);" name="AdminID" src="<?php echo site_url('config/edit_close/admin/adminid/admin/1/').'/'?>" id="lbtnClose" href="javascript:;)">批量关闭</a>
                    <a onclick="javascript:return checkEdit(this);" name="AdminID" src="<?php echo site_url('config/admin_setrole/').'/'?>" id="lbtnClose" href="javascript:;)">设置角色组</a>
                    <a href="javascript:SearchDialog()">查询管理员</a>
                </td>
            </tr>
        </table>
        <!--操作选项结束-->
        <!--列表开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_list" id="TbList">
            <tr class="table_list_title">
                <td style="width: 2%">
                    <input type="checkbox" name="checkbox" value="checkbox" onclick="javascript:checkAll(this,'AdminID')" />
                </td>
                <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=AdminID&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    编号<img src="../Themes/Images/up.gif"/>
                </td>
                <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=AdminName&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    管理员帐号
                </td>
                <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=RealName&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    姓名
                </td>
                <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=Email&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    E-mail
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=Department&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    部门
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=Department&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    角色
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=LoginNum&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    登录次数
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=LastLoginTime&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    上次登录时间
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ThisLoginTime&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    本次登录时间
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ManageAdminID&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    创建人
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    创建时间
                </td>
                <td style="width: 5%" onclick="javascript:GoTo('?OrderKey=IsClose&AscDesc=desc&txtAdminName=&drpAdminGroupID=-1&txtRealName=&txtEmail=&txtDepartment=&radIsClose=-1&page=1')" title="点击排序">
                    状态
                </td>
            </tr>
                <?php foreach($list as $k=>$v) :?>
                    <tr class="table_list_row_normal">
                        <td style="width: 2%">
                            <input name="AdminID" type="checkbox" id="AdminID" value="<?php echo $v['adminid']?>"  />
                        </td>
                        <td style="width: 5%" >
                            <?php echo $v['adminid']?>
                        </td>
                        <td style="width: 5%" >
                            <a href="<?php echo b_url('config/admin_add/').$v['adminid'];?>">
                                <?php echo $v['adminname']?></a>
                        </td>
                        <td style="width: 5%" >
                            <?php echo $v['realname']?>
                        </td>
                        <td style="width: 10%" >
                            <?php echo $v['email']?>
                        </td>
                        <td style="width: 10%" >
                            <?php echo $v['department']?>
                        </td>
                        <td style="width: 10%" >
                            <?php 
                            foreach ($v['rolename'] as $key => $value) {
                                # code...
                                if($value){
                                    echo $value.'<br>';
                                }else{
                                    continue;
                                }

                            }
                            ?>
                        </td>
                        <td style="width: 10%" >
                            <?php echo $v['loginnum']?>
                        </td>
                        <td style="width: 10%" >
                            <?php echo $v['lastlogintime']?>
                        </td>
                        <td style="width: 10%" >
                            <?php echo $v['thislogintime']?>
                        </td>
                        <td style="width: 10%" >
                            <?php 
                                foreach($list as $ks=>$ns){
                                    if($v['manageadminid'] == $ns['adminid']){
                                        echo $ns['adminname'];
                                    }else{
                                        continue;
                                    }
                                }
                            ?>
                        </td>
                        <td style="width: 10%" >
                            <?php echo $v['addtime']?>
                        </td>
                        <td style="width: 5%" >
                            <?php 
                            if($v['isclose'] == 0){
                                echo '开放';
                            }else {
                                echo '<span style="color:red">关闭</span>';
                            }
                            ?>
                        </td>
                    </tr>
                <?php endforeach ; ?>
                    
                
        </table>
        <!--列表结束-->    
<?php $pagination->show();?>
<script src="/static/bk/js/table.js" type="text/javascript"></script>
<?php $this->load->view('layout/footer'); ?>

